package User;

import Book.Book;
import Book.BookList;
import BookOperation.*;

import java.util.Scanner;

public class User extends Control {

    public User(String name) {
        super(name);
        this.iOperations = new IOperation[]{
                new ExitBms(),
                new FindBook(),
                new BorrowBook(),
                new ShowBook(),
        };
    }

    public int menu() {
        System.out.println("======================");
        System.out.println("欢迎[" + name + "]来到图书管理系统!");
        System.out.println("1.查找图书");
        System.out.println("2.借阅图书");
        System.out.println("3.展示图书");
        System.out.println("0.退出系统");
        System.out.println("=======================");
        System.out.print("请输入你的操作:>");
        Scanner scanner = new Scanner(System.in);
        int choice = scanner.nextInt();
        return choice;
    }
}
